Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

App store is rejecting my plugin now #26

Closed
ptarjan opened this issue Oct 9, 2015 · 28 comments
Closed

App store is rejecting my plugin now #26

ptarjan opened this issue Oct 9, 2015 · 28 comments

Comments

@ptarjan
Copy link
Contributor

ptarjan commented Oct 9, 2015

I tried submitting an App with your plugin as my only change and got this email from Apple:

Dear developer,

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

Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it.

Once these issues have been corrected, you can then redeliver the corrected binary.

Regards,

The App Store team

I don't know if it is related, but when I open the XCode project I get this:

image

Can you either update your Swift code or remove it please?

@nikDemyankov
Copy link
Member

Dammit... The best would be this: move local development mode to separate folder. Right now you can try to hit the "Convert" button and republish the app. Or I'll update swift files and republish the plugin on Monday. During the weekend I wanted to fix some issues, including www folder reinstall.

@nikDemyankov
Copy link
Member

As I understand - you are building project from the command line. After some digging and experiments, I found this SO answer. According to it, the problem is with generated .ipa file: it doesn't contain SwiftSupport folder. Please, unpack your release .ipa file and check if it so.

If yes - then this is a xcodebuild tool issue. As I understand - if you build your project directly from the Xcode - it should be fine.

"Convert to Latest Swift Syntax" does nothing. Tried it, no changes were made. Also, used latest swift sources - same result. So this is some strange behaviour from the Xcode & Ionic/Cordova.

@ptarjan
Copy link
Contributor Author

ptarjan commented Oct 12, 2015

Sorry for the slow reply.

Yeah, I'm using a command line build tool, but it is pretty straightforward:

cordova build --release --device ios

and then the ..ipa is in platform/ios/build/device.

@ptarjan
Copy link
Contributor Author

ptarjan commented Oct 12, 2015

As for that directory, yeah, there isn't anything:

$ cp platforms/ios/build/device/*.ipa /tmp/a.zip
$ cd /tmp
$ unzip a.zip
...
$ find Payload/ -name *SwiftSupport*
$

@nikDemyankov
Copy link
Member

Try to build for release from the Xcode, unarchive generated .ipa and check, if SwiftSupport directory is now there.

@ptarjan
Copy link
Contributor Author

ptarjan commented Oct 12, 2015

Nope, still no SwiftSupport.

$ find Payload/ -name *SwiftSupport*
$

If I diff the two outputs I get:

$ diff -r Payload/ /tmp/Payload/
Binary files Payload/App.app/Frameworks/libswiftCore.dylib and /tmp/Payload/App.app/Frameworks/libswiftCore.dylib differ
Binary files Payload/App.app/Frameworks/libswiftCoreGraphics.dylib and /tmp/Payload/App.app/Frameworks/libswiftCoreGraphics.dylib differ
Binary files Payload/App.app/Frameworks/libswiftDarwin.dylib and /tmp/Payload/App.app/Frameworks/libswiftDarwin.dylib differ
Binary files Payload/App.app/Frameworks/libswiftDispatch.dylib and /tmp/Payload/App.app/Frameworks/libswiftDispatch.dylib differ
Binary files Payload/App.app/Frameworks/libswiftFoundation.dylib and /tmp/Payload/App.app/Frameworks/libswiftFoundation.dylib differ
Binary files Payload/App.app/Frameworks/libswiftObjectiveC.dylib and /tmp/Payload/App.app/Frameworks/libswiftObjectiveC.dylib differ
Binary files Payload/App.app/Info.plist and /tmp/Payload/App.app/Info.plist differ
Binary files Payload/App.app/MainViewController.nib and /tmp/Payload/App.app/MainViewController.nib differ
Only in /tmp/Payload/App.app: ResourceRules.plist
Binary files Payload/App.app/App and /tmp/Payload/App.app/App differ
diff -r Payload/App.app/_CodeSignature/CodeResources /tmp/Payload/App.app/_CodeSignature/CodeResources
... Lots of things from that file ...
Only in Payload/App.app: archived-expanded-entitlements.xcent

(Payload is XCode's IPA and /tmp/Payload is cordova's)

@nikDemyankov
Copy link
Member

Now that is strange. Can you check this:

  1. Open your Xcode project
  2. Select Product > Scheme > Edit Scheme
  3. Click Build in the left sidebar
  4. For your test target - is Archive checkbox is checked? If so - uncheck it and click Close button. And try again to build with Xcode.

@ptarjan
Copy link
Contributor Author

ptarjan commented Oct 12, 2015

Yes, everything was checked:

image

If I uncheck that box, now I can't archive my app. How do you want me to make a release .ipa?

@nikDemyankov
Copy link
Member

I ment:

screen shot 2015-10-12 at 11 13 02

Like Nordnet2Tests on the screenshot. Do you have something like this?

@ptarjan
Copy link
Contributor Author

ptarjan commented Oct 12, 2015

Nope, just one row

@ptarjan
Copy link
Contributor Author

ptarjan commented Oct 12, 2015

I need to head to bed. I'll read whatever instructions you leave in the morning.

@nikDemyankov
Copy link
Member

Okey, thanks for the try. I'll try to figure out something. But still think that this is some Xcode/xcodebuild issue.

Good night)

@ptarjan
Copy link
Contributor Author

ptarjan commented Oct 12, 2015

Well it should be easy to reproduce. I'm on XCode 7.0 if that matters. Just add your plugin to a cordova project, use the build command I posted then submit the IPA to Test Flight and see the rejection email.

@hirbod
Copy link

hirbod commented Oct 14, 2015

Well, as soon as I include this plugin and try to build on REAL device (iOS9, iOS8 just works fine) (simulator just works fine) I get:

dyld: Library not loaded: @rpath/libswiftCore.dylib

Referenced from: /private/var/mobile/Containers/Bundle/Application/...

Reason: no suitable image found. Did find:

/private/var/mobile/Containers/Bundle/Application/1.../Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x100CD0000, size=0x0015C000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/.../Frameworks/libswiftCore.dylib

As soon as I remove this plugin, everything works fine. Now I've submitted my app to the app store yesterday before trying on a real device with iOS 9 (just updated today) , so I'm dead sure that Apple will also will reject my app as it will crash. Do you have a fast fix here @nikDemyankov? Some guys on SO said its related due to old mobile-provisionings (missing OU in subject, but my certs are fine)

Some embedded-framework problem here?

@nikDemyankov
Copy link
Member

@hirbod

  1. When do you get that error? When you build and run on the real device from the console, or from the Xcode?
  2. If this is a build problem - please, provide more detailed log from the Xcode.
  3. Does that crashes your device? If so - more detailed crashlog would help.
  4. What version of the Xcode you have installed?
  5. Is this Cordova or Ionic project?

Just created a test project and launched it on the iPhone 6 with iOS 9. Nothing crashes, updates are performed...

I really need to hurry up with the separate plugin for local dev mode...

@ptarjan
Copy link
Contributor Author

ptarjan commented Oct 15, 2015

@nikDemyankov It isn't crashing or anything. The plugin works great when developing. Apple is rejecting it when you send the app to the app store. For this reason, I can't get your plugin into my prod app at all.

Are you using it for production apps in the store?

@nikDemyankov
Copy link
Member

@ptarjan in your case - yes, it is an issues with the SwiftSupport folder, that is not created for some reason, when .ipa file is generated. But it looks like @hirbod having some other problem.

@hirbod
Copy link

hirbod commented Oct 15, 2015

HI @nikDemyankov

When do you get that error? When you build and run on the real device from the console, or from the Xcode?

Only on real device. And only since I've upgrade to iOS 9. iOS 8 worked well. (iPhone 6)

If this is a build problem - please, provide more detailed log from the Xcode.

I alreay posted all the output to you.

Does that crashes your device? If so - more detailed crashlog would help.

Yes, it crash the device. App will start up (no compile error), but die at first signal.

What version of the Xcode you have installed?

Xcode 7.0.1, newest

Is this Cordova or Ionic project?

Cordova

My environment is up to date, CLI, Cordova and all the tools also.

Edit:
By the way. I already tried project from scratch, deleted iOS Platform, reinstalled plugin (from npm and from github). Nothing changed. Swift is making problems here.
Also checked the flag "Embedded Code contains Swift". It was already checked. But as soon as I try to run it on my real device, I get this problems.

@ptarjan
Copy link
Contributor Author

ptarjan commented Oct 15, 2015

Yes, these are two different problems. @hirbod can you open another issue since yours doesn't match the title of this issue.

@nikDemyankov
Copy link
Member

Created separate issue for Swift and crashes.

@hilkeheremans
Copy link

+1 to the Swift stuff, having the same issues.

@ptarjan
Copy link
Contributor Author

ptarjan commented Nov 4, 2015

Any progress on this? I really need it and am about to abandon using this plugin if we can't fix this soon.

@nikDemyankov
Copy link
Member

Yes, working on version 1.1.0. Local development mode will be a separate plugin - add-on to this one. For the release version you just remove it and no problem with the swift. I hope to finish it by the end of the week.

@ptarjan
Copy link
Contributor Author

ptarjan commented Nov 9, 2015

ping, anything I can help with? Can I send a PR with just deleting all the swift code?

@nikDemyankov
Copy link
Member

No need in PR. There is a branch with version 1.1.0. It is already without local-dev mode and swift. And it is not gonna change anymore, only docs. You can use it.

Right now I'm finishing with the local-dev plugin. Need to fix the cleanup process, and then only docs is left.

@nikDemyankov
Copy link
Member

Released v1.1.0. In it local development feature is moved to the separate plugin - Local Development Add-on. You should use it for development purpose only, and when it is time for release - remove it by executing:

cordova plugin remove cordova-hot-code-push-local-dev-addon

In the case of Ionic:

cordova plugin remove cordova-hot-code-push-local-dev-addon

After updating Hot Code Push plugin in the existing project you should check the following:

  1. In your iOS project ensure, that Embedded Content Contains Swift Code is set to NO.
  2. In the iOS project open <YOUR_PROJECT_NAME>-Prefix.pch file and remove <YOUR_PROJECT_NAME>-Swift.h import.

Or you can just update the plugin, remove ios platform and then add it again. As a result - cordova will install all the plugins and you don't have do to anything.

@nikDemyankov
Copy link
Member

Also, added Migrating from previous version section in the readme.

@nikDemyankov
Copy link
Member

Closing the issue since no more swift code in the main plugin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants