microsoft / code-push-server

Standalone CodePush server from App Center
MIT License
616 stars 161 forks source link

iOS CodePushServerURL plist doesn't like // #41

Closed kmcrawford closed 1 week ago

kmcrawford commented 2 weeks ago

When setting up the info.plist to include the CodePushServerURL

Example:

<key>CodePushServerURL</key>
<string>https://mycode-push.server.com</string>

You get this error: (masked)

error: unable to read property list from file: /Users/****/Library/Developer/Xcode/DerivedData/**_mobile-**/Build/Intermediates.noindex/tw_mobile.build/Debug-iphonesimulator/**_mobile.build/Preprocessed-Info.plist: The operation couldn’t be completed. (XCBUtil.PropertyListConversionError error 2.) (in target '**_mobile' from project '**_mobile')

If I look at the Preprocessed-Info.plist I see the following:

<key>CodePushServerURL</key>
 <string>https:
 <key>UIViewControllerBasedStatusBarAppearance</key>
 <false/>

The end of the string is missing, I'm not sure it likes the //. I could wrap this in double quotes to get it to build but I'm not sure if that will cause additional issues.

kmcrawford commented 2 weeks ago

I was able to get around this issue by setting the plist to:

<key>CodePushServerURL</key>
<string>$(CODE_PUSH_SERVER_URL)</string>

Then:

  1. Open Xcode and go to your project’s Build Settings.
  2. Add a new User-Defined Setting. Name it CODE_PUSH_SERVER_URL and set its value to
ahsanparacha02 commented 1 week ago

@kmcrawford what are the steps for setting up with live server ? while file need to upload on server

kmcrawford commented 1 week ago

This has nothing to do with the server setup, this is all client side and building the iOS application.

kmcrawford commented 1 week ago

Perhaps this issue should be with https://github.com/microsoft/react-native-code-push repo