MacOSLib and App Store

  1. 6 years ago

    Mark O

    16 Mar 2014 Europe(UK)

    I was playing around with the MacOSLib, with a view to use it in future projects, but I am a little concerned that there may be some aspects of it that could cause any apps to be rejected by the App Store. Does anyone know if this is an issue?

    If you use some MacOSLib API's that declare into deprecated API's like QTKit, which MacOSLib has lots of functionality for, then you can get rejected for using a deprecated API

    But if you don't then any unused functionality is not included in your application - unused items are stripped out.

  2. Kem T

    16 Mar 2014 Pre-Release Testers, Xojo Pro, XDC Speakers, MVP Connecticut

    No, it's not an issue. MacOSLib only gives you access to OS calls that might otherwise be unavailable in pure Xojo code. These are the same calls you'd use if you used Xcode.

  3. Mark O

    16 Mar 2014 Europe(UK)

    Thanks Kem, that is exactly what I wanted to hear. During the period that we couldn't submit to the app store, I wrote a few small utilities in Objective-C, just to get them up, but I would like the chance to rewrite them in Xojo and resubmit.

  4. Norman P

    16 Mar 2014 Xojo Inc, Pre-Release Testers, Xojo Pro Answer Seeking work. npalardy@great-w...

    If you use some MacOSLib API's that declare into deprecated API's like QTKit, which MacOSLib has lots of functionality for, then you can get rejected for using a deprecated API

    But if you don't then any unused functionality is not included in your application - unused items are stripped out.

  5. Mark O

    16 Mar 2014 Europe(UK)

    @Mark O Thanks Kem, that is exactly what I wanted to hear. During the period that we couldn't submit to the app store, I wrote a few small utilities in Objective-C, just to get them up, but I would like the chance to rewrite them in Xojo and resubmit.

    Thanks Norman, I thought that might be the case. So even though the QTKit classes are in the library, the frameworks are not loaded unless I use them.

  6. Norman P

    16 Mar 2014 Xojo Inc, Pre-Release Testers, Xojo Pro Seeking work. npalardy@great-w...

    If you use something in MacOSLib that depends on deprecated technologies - QTKit is an easy example - then yes you could get rejected for that

    If you don't then you should be fine as unused classes / methods etc get stripped out as a normal part of the compilation process

  7. Thomas T

    17 Mar 2014 Pre-Release Testers, Xojo Pro Europe (Germany, Munich)

    I think the most important part about your question is this:

    Even if there's a problem within Macoslib, you and anyone else around here can help you fix this quickly because it's all open source, and it's all based on documented Apple functions.

    Contrary to that, if you rely on functions in the Xojo libraries or in some plugins, you have little control over fixing it yourself. You'll have to wait for the maker of the lib or plugin to fix it.

  8. Norman P

    17 Mar 2014 Xojo Inc, Pre-Release Testers, Xojo Pro Seeking work. npalardy@great-w...

    You may just have to tear out all the localized strings in MacOSLib (menu string I think) otherwise Apple will list your app as being localized when it might not be or list it as localized into locales its not localized into

  9. Eduardo G

    17 Mar 2014 Pre-Release Testers Europe (Madrid, Spain)

    @Norman P You may just have to tear out all the localized strings in MacOSLib (menu string I think) otherwise Apple will list your app as being localized when it might not be or list it as localized into locales its not localized into

    This actually burned me a couple of times so I added a build step to just get rid of them (it's very sloppy, but I wrote it in a pinch in sublimetext and since it worked I didn't try a more sensible approach, like the shell just getting rid of everything but the correct languages):

    dim dest as string
      dest = CurrentBuildLocation +"/"   + chr(34) + CurrentBuildAppName   + chr(34) + ".app/Contents/Resources"
      
      dim cmd as string
      cmd = "/bin/rm -rf " + dest + "/"
      'print cmd
      
      call doshellcommand(cmd+ "bg.lproj"+"/")
      call doshellcommand(cmd+ "bn.lproj"+"/")
      call doshellcommand(cmd+ "cs.lproj"+"/")
      call doshellcommand(cmd+ "da.lproj"+"/")
      call doshellcommand(cmd+ "de.lproj"+"/")
      call doshellcommand(cmd+ "el.lproj"+"/")
      call doshellcommand(cmd+ "et.lproj"+"/")
      call doshellcommand(cmd+ "fi.lproj"+"/")
      call doshellcommand(cmd+ "fr.lproj"+"/")
      call doshellcommand(cmd+ "he.lproj"+"/")
      call doshellcommand(cmd+ "hr.lproj"+"/")
      call doshellcommand(cmd+ "hu.lproj"+"/")
      call doshellcommand(cmd+ "is.lproj"+"/")
      call doshellcommand(cmd+ "it.lproj"+"/")
      call doshellcommand(cmd+ "ja.lproj"+"/")
      call doshellcommand(cmd+ "nl.lproj"+"/")
      call doshellcommand(cmd+ "no.lproj"+"/")
      call doshellcommand(cmd+ "pl.lproj"+"/")
      call doshellcommand(cmd+ "pt.lproj"+"/")
      call doshellcommand(cmd+ "ro.lproj"+"/")
      call doshellcommand(cmd+ "sk.lproj"+"/")
      call doshellcommand(cmd+ "sl.lproj"+"/")
      call doshellcommand(cmd+ "sv.lproj"+"/")
      call doshellcommand(cmd+ "tr.lproj"+"/")

    (tried to paste the build step but copying/pasting didn't work here)

  10. Norman P

    17 Mar 2014 Xojo Inc, Pre-Release Testers, Xojo Pro Seeking work. npalardy@great-w...

    I know this has caught a few people as we had bugs reported about the IDE localizing thing magically
    I'd made the suggestion that these strings be pulled out and only "default" values left in and the rest of the localized value put in Lingua files so they could be added if needed

    For now you have to know about this & do it yourself

  11. last year

    Sorry for the thread necro, but I just experienced what Norman says here (btw, Hi Norman, long time no see, was Maui 2004 i think).
    I built an application with no localizations but English, but it was built on a Mac OS with Swedish set as primary language, and all menu items that are added to Application Menu plus "undo" in Edit are in Swedish, even when running on a system with English set as primary language.

    This was built with 2018R3.

    So, any idea how to strip that away? Eduardos approach?

  12. And building on a system set to English as primary language will have English added menues.
    So, I consider this a bug!

  13. Since I use App Wrapper, I do not care to remove these items from MacOsLib. I just remove them in App Wrapper.

    By the way, just in case you were not aware, there is a 64bit version at:
    https://github.com/vidalvanbergen/macoslib/tree/master-64bit

    But I have not sent yet any 64bit app to MAS.

  14. Jason P

    26 Oct 2018 Xojo Inc, Forum Moderators Texas

    The problem is that MacOSLib has localized values in numerous places. When you build all of those values get put into the various localized strings and when Apple sees your app they may well test it in every localization that exists and find that your localization is incomplete.

    As Norm stated some time ago - basically you need to strip out all the localized values you do not support. You could use Eduardo's method to post process your built app.

  15. Edited last year

    Hi,
    I just tried this with a plain new application, just create new and build, not using MacOSLib at all unless it's automatically linked for some reason. I put my results into a PDF.
    Link to PDF

  16. Alberto D

    26 Oct 2018 Pre-Release Testers, Xojo Pro

    @Totte A Sorry for the thread necro, but I just experienced what Norman says here (btw, Hi Norman, long time no see, was Maui 2004 i think).
    I built an application with no localizations but English, but it was built on a Mac OS with Swedish set as primary language, and all menu items that are added to Application Menu plus "undo" in Edit are in Swedish, even when running on a system with English set as primary language.

    This was built with 2018R3.

    So, any idea how to strip that away? Eduardos approach?

    If you only want English and building in a non-English system, you can change the Build Settings - Shared - Build - Language to English

  17. Edited last year

    Ah, thanks!
    Just got that answer another way too. That was hard to find!
    And now testing if it works...

    and it does!

    case closed!

or Sign Up to reply!