Adding a Symbolic Link in the Application Bundle

前端 未结 2 1896
隐瞒了意图╮
隐瞒了意图╮ 2020-12-11 21:02

Apple specifies in the UILocalNotification class reference that the audio file must be from the application bundle. However, some smart geek has found his way a

相关标签:
2条回答
  • 2020-12-11 21:26

    If you place a symlink to ../../Documents/blabla.caf inside a folder, and then add the folder to the project (making sure that you have "Create folder references..." set on import instead of "Create groups...") then Xcode won't try to resolve the link during the build process.

    I've verified that the link itself works fine in the app, though I'm not sure off the top of my head if UILocalNotification will accept folder/blabla.caf in its soundName property.

    0 讨论(0)
  • 2020-12-11 21:46

    Despite symlink from bundle to documents directory works in iOS 7.1, this workaround becomes unusefull if you are going to put an app in the AppStore. Since March 2014 apps with such symbolic links will not pass to the review.

    After I have uploaded app with such link in the bundle to iTunes connect I receive an Invalid binary status immediately. With following mail from iTunes Store:

    Dear developer,

    We have discovered one or more issues with your recent delivery for "X". To process your delivery, the following issues must be corrected:

    Invalid Symlink - Your package contains a symbolic link 'External/Documents' which resolves to a location 'External/../../Documents' that does not exist or is outside of the package.

    ...

    Regards,

    The App Store team

    0 讨论(0)
提交回复
热议问题