nordnet / cordova-hot-code-push-local-dev-addon

[DEPRECATED] - Cordova plugin that adds local development feature to the Hot Code Push plugin.
https://github.com/nordnet/cordova-hot-code-push-local-dev-addon/issues/29
MIT License
24 stars 30 forks source link

Not working on iOS with Cordova v6.3.1 #12

Closed nikDemyankov closed 8 years ago

nikDemyankov commented 8 years ago

Issue

I have been following the quick start guides to install this plugin, the server starts and gets notified when something changes but the app will not run in the ios simulator (starts and crashes). In android it will run but not update. I get errors in xcode:

*\ Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/.../Library/Developer/CoreSimulator/Devices/3439EEE9-A925-46B0-99F8-3CC2451DABE1/data/Containers/Bundle/Application/38197BDC-E3E3-4A8D-993F-BB35F4A647B1/TestProject.app> (loaded)' with name 'NSMainNibFile~ipad''

With this pice of code highlighted

 @autoreleasepool {
        int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
        return retVal;
    }
Steps to reproduce
  1. Create a cordova/ionic 2 project
  2. Install both plugins and cli
  3. Follow quickstart guide
    System info
Node version: v5.10.0

Cordova version: 6.3.1

Config.xml file:

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.example.testproject" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>TestProject</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="dev@cordova.apache.org" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
    <plugin name="cordova-hot-code-push-local-dev-addon" spec="~0.2.2" />
    <chcp>
      <local-development enabled="true" />
    </chcp>
</widget>

Plugins:

cordova-hot-code-push-local-dev-addon,cordova-hot-code-push-plugin,cordova-plugin-whitelist

Android platform:

Available Android targets:
----------
id: 1 or "android-23"
     Name: Android 6.0
     Type: Platform
     API level: 23
     Revision: 3
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : default/x86, default/x86_64, google_apis/armeabi-v7a, google_apis/x86, google_apis/x86_64
----------
id: 2 or "Google Inc.:Google APIs:23"
     Name: Google APIs
     Type: Add-On
     Vendor: Google Inc.
     Revision: 1
     Description: Android + Google APIs
     Based on Android 6.0 (API level 23)
     Libraries:
      * com.android.future.usb.accessory (usb.jar)
          API for USB Accessories
      * com.google.android.media.effects (effects.jar)
          Collection of video effects
      * com.google.android.maps (maps.jar)
          API for Google Maps
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : no ABIs.

iOS platform:

Xcode 7.3
Build version 7D175

Reported by @Lindstrom1989.

ep-mark commented 8 years ago

I am seeing the same problem when I add this plugin to my cordova app. I think this is related to this issue: http://stackoverflow.com/questions/18618001/cordova-3-0-plugin-plist-config

L-X-T commented 8 years ago

Same problem over here, does anybody know what to do?

nikDemyankov commented 8 years ago

I'll try to fix it today and upload the fix.

L-X-T commented 8 years ago

It seems like there are 2 problems on Cordova Version >= 6.3.0 :

1.) Updating doesn't work though cordova-hcp server says "Should trigger update"

2.) Starting of app fails due to 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'NSMainNibFile~ipad''

The 2.) can easily be fixed by removed the setting line in the Info.plist.

nikDemyankov commented 8 years ago

Just uploaded v0.3.0 with fix for crashes. Updates should work now as well.

nikDemyankov commented 8 years ago

Closing the issue, since crashes no more. Reopen it, if problem is still there.

uamanager commented 7 years ago

just add these lines into config.xml

<platform name="ios">
    <config-file platform="ios" target="*-Info.plist" parent="NSMainNibFile">
        <string></string>
    </config-file>
</platform>
<platform name="ios">
    <config-file platform="ios" target="*-Info.plist" parent="NSMainNibFile~ipad">
        <string></string>
    </config-file>
</platform>
ejulfaey commented 6 years ago

@uamanager I still got crashed

anil1712 commented 6 years ago

@uamanager I am getting crashed too.

@ejulfaey Did you get any solution?