Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with Meteor 1.2 #8

Open
woniesong92 opened this issue Aug 28, 2015 · 37 comments
Open

Integrate with Meteor 1.2 #8

woniesong92 opened this issue Aug 28, 2015 · 37 comments

Comments

@woniesong92
Copy link

Meteor team just released Meteor 1.2-rc7, which includes the latest cordova integrations.

Cordova has been updated to 5.2.0, the latest version at the time of release. This includes Cordova Android 4.1 and Cordova iOS 3.9.

I thought this package is only to support a higher cordova version than Meteor used to support, so that we can use Wkwebview. Now that Meteor supports the latest cordova version, I thought I could just do

meteor add cordova:com.telerik.plugins.wkwebview@5.0.0

The package was added successfully, but the app crashed on iphone. After I removed the package, it started working again. Could you provide me with some insight to resolve this problem?

@fungilation
Copy link

+1 on Wkwebview. Mobile web apps need all the performance it can get and this is a big boost over the previous webview.

@rbabayoff
Copy link
Member

No, this package includes a modified version of Telerik's cordova wkwebview plugin, adopted for meteor (supporting meteor auto updates / hot code pushes). Problem is that I couldn't merge Telerik upstream with many bug fixes, including for most open bugs here, because they upgraded their cordova dependency to 5.0 and meteor was lagging behind. As soon as an official release of meteor comes out with 5.0 support, I'll merge Telerik's upstream and publish this one.

@rbabayoff
Copy link
Member

And restating here, I'm not an Objective C developer, so I'm looking for help maintaining this with someone that knows Objective C.

@jamielob
Copy link

Hi @rbabayoff! Thanks for creating this plugin, desperately needed. Now that 1.2 is out with Cordova 5, any idea when you'll be able make the merge you described above?

@rbabayoff
Copy link
Member

Hey @jamielob, will work on it this week.

@lorensr
Copy link

lorensr commented Sep 23, 2015

Thanks a lot! 🙏😄🙌

@tdesc
Copy link

tdesc commented Sep 24, 2015

+1 waiting for a miracle )

@v3rron
Copy link

v3rron commented Sep 30, 2015

+1

@JamesLefrere
Copy link
Contributor

👍 this would be so useful! I would help but the Obj C seems over my head...

@Wenape
Copy link

Wenape commented Sep 30, 2015

+1

@jamielob
Copy link

jamielob commented Oct 1, 2015

Hey @rbabayoff - is there somewhere I can buy you a couple beers/coffees online for your work on this?

@unboundmusic
Copy link

+1

1 similar comment
@joelpickup
Copy link

+1

@dfischer
Copy link

How's this looking?

@nerdmed
Copy link

nerdmed commented Oct 12, 2015

hi @rbabayoff, how are you doing? Our team (flowkey) worked a lot with your package and we are also going to upgrade to 1.2, can you share the current state? I am sure we can support a little. What do you think?

@constantx
Copy link

👍

1 similar comment
@daniel
Copy link

daniel commented Oct 14, 2015

+1

@jamielob
Copy link

Anyone else out there able to work on this?

@JamesLefrere
Copy link
Contributor

I've had a look at it, but I genuinely don't know what I'm doing with Objective C; seems like there's an uncaught exception when it starts the server: https://github.com/JamesLefrere/WKWebView

Here's the test project I've been using: https://github.com/JamesLefrere/meteor-cordova-wkwebview-test

To use it, change the package.js file here to point towards the cordova plugin on your local filesystem:

'com.telerik.plugins.wkwebview': 'file:///Users/james/dev/cordova-plugins/WKWebView'

Any ideas, anyone??

Cheers
James

PS: Xcode crying below:

cordova-test-app`-[GCDWebServer addHandlerWithMatchBlock:asyncProcessBlock:]:
0xa9080 <+0>:   pushl  %ebp
0xa9081 <+1>:   movl   %esp, %ebp
0xa9083 <+3>:   pushl  %ebx
0xa9084 <+4>:   pushl  %edi
0xa9085 <+5>:   pushl  %esi
0xa9086 <+6>:   subl   $0x3c, %esp
0xa9089 <+9>:   calll  0xa908e                   ; <+14> at GCDWebServer.m:351
0xa908e <+14>:  popl   %eax
0xa908f <+15>:  movl   0x14(%ebp), %ecx
0xa9092 <+18>:  movl   0x10(%ebp), %edx
0xa9095 <+21>:  movl   0xc(%ebp), %esi
0xa9098 <+24>:  movl   0x8(%ebp), %edi
0xa909b <+27>:  leal   -0x18(%ebp), %ebx
0xa909e <+30>:  movl   %edi, -0x10(%ebp)
0xa90a1 <+33>:  movl   %esi, -0x14(%ebp)
0xa90a4 <+36>:  movl   $0x0, -0x18(%ebp)
0xa90ab <+43>:  movl   %ebx, (%esp)
0xa90ae <+46>:  movl   %edx, 0x4(%esp)
0xa90b2 <+50>:  movl   %eax, -0x24(%ebp)
0xa90b5 <+53>:  movl   %ecx, -0x28(%ebp)
0xa90b8 <+56>:  calll  0xb6cb2                   ; symbol stub for: objc_storeStrong
0xa90bd <+61>:  leal   -0x1c(%ebp), %eax
0xa90c0 <+64>:  movl   $0x0, -0x1c(%ebp)
0xa90c7 <+71>:  movl   -0x28(%ebp), %ecx
0xa90ca <+74>:  movl   %eax, (%esp)
0xa90cd <+77>:  movl   %ecx, 0x4(%esp)
0xa90d1 <+81>:  calll  0xb6cb2                   ; symbol stub for: objc_storeStrong
0xa90d6 <+86>:  movl   -0x10(%ebp), %eax
0xa90d9 <+89>:  movl   -0x24(%ebp), %ecx
0xa90dc <+92>:  movl   0x3723e(%ecx), %edx
0xa90e2 <+98>:  cmpl   $0x0, (%eax,%edx)
0xa90e9 <+105>: je     0xa90f4                   ; <+116> at GCDWebServer.m:352
0xa90ef <+111>: calll  0xb6946                   ; symbol stub for: abort
0xa90f4 <+116>: jmp    0xa90f9                   ; <+121> at GCDWebServer.m:352
0xa90f9 <+121>: jmp    0xa90fe                   ; <+126> at GCDWebServer.m:353
0xa90fe <+126>: movl   -0x24(%ebp), %eax
0xa9101 <+129>: movl   0x36dee(%eax), %ecx
0xa9107 <+135>: movl   0x35d02(%eax), %edx
0xa910d <+141>: movl   %ecx, (%esp)
0xa9110 <+144>: movl   %edx, 0x4(%esp)
0xa9114 <+148>: calll  0xb6c5e                   ; symbol stub for: objc_msgSend
0xa9119 <+153>: movl   -0x18(%ebp), %ecx
0xa911c <+156>: movl   -0x1c(%ebp), %edx
0xa911f <+159>: movl   -0x24(%ebp), %esi
0xa9122 <+162>: movl   0x36b4a(%esi), %edi
0xa9128 <+168>: movl   %eax, (%esp)
0xa912b <+171>: movl   %edi, 0x4(%esp)
0xa912f <+175>: movl   %ecx, 0x8(%esp)
0xa9133 <+179>: movl   %edx, 0xc(%esp)
0xa9137 <+183>: calll  0xb6c5e                   ; symbol stub for: objc_msgSend
0xa913c <+188>: xorl   %ecx, %ecx
0xa913e <+190>: movl   %eax, -0x20(%ebp)
0xa9141 <+193>: movl   -0x10(%ebp), %eax
0xa9144 <+196>: movl   -0x24(%ebp), %edx
0xa9147 <+199>: movl   0x3722e(%edx), %esi
0xa914d <+205>: movl   (%eax,%esi), %eax
0xa9150 <+208>: movl   -0x20(%ebp), %esi
0xa9153 <+211>: movl   0x36b4e(%edx), %edi
0xa9159 <+217>: movl   %eax, (%esp)
0xa915c <+220>: movl   %edi, 0x4(%esp)
0xa9160 <+224>: movl   %esi, 0x8(%esp)
0xa9164 <+228>: movl   $0x0, 0xc(%esp)
0xa916c <+236>: movl   %ecx, -0x2c(%ebp)
0xa916f <+239>: calll  0xb6c5e                   ; symbol stub for: objc_msgSend
0xa9174 <+244>: xorl   %eax, %eax
0xa9176 <+246>: leal   -0x20(%ebp), %ecx
0xa9179 <+249>: movl   %ecx, (%esp)
0xa917c <+252>: movl   $0x0, 0x4(%esp)
0xa9184 <+260>: movl   %eax, -0x30(%ebp)
0xa9187 <+263>: calll  0xb6cb2                   ; symbol stub for: objc_storeStrong
0xa918c <+268>: xorl   %eax, %eax
0xa918e <+270>: leal   -0x1c(%ebp), %ecx
0xa9191 <+273>: movl   %ecx, (%esp)
0xa9194 <+276>: movl   $0x0, 0x4(%esp)
0xa919c <+284>: movl   %eax, -0x34(%ebp)
0xa919f <+287>: calll  0xb6cb2                   ; symbol stub for: objc_storeStrong
0xa91a4 <+292>: xorl   %eax, %eax
0xa91a6 <+294>: leal   -0x18(%ebp), %ecx
0xa91a9 <+297>: movl   %ecx, (%esp)
0xa91ac <+300>: movl   $0x0, 0x4(%esp)
0xa91b4 <+308>: movl   %eax, -0x38(%ebp)
0xa91b7 <+311>: calll  0xb6cb2                   ; symbol stub for: objc_storeStrong
0xa91bc <+316>: addl   $0x3c, %esp
0xa91bf <+319>: popl   %esi
0xa91c0 <+320>: popl   %edi
0xa91c1 <+321>: popl   %ebx
0xa91c2 <+322>: popl   %ebp
0xa91c3 <+323>: retl   

@jamielob
Copy link

Hey @JamesLefrere - are you trying to merge in the changes from Telerik's package into this one or start fresh?

@JamesLefrere
Copy link
Contributor

@jamielob This was based on merging in the new versions from Telerik, and I think there were some Meteor-related changes too (e.g. I had to import the CordovaUpdate header another way). It really did change a lot though, so maybe starting afresh could make sense (for someone with the ObjC skill).

@johnthepink
Copy link

@JamesLefrere Thanks for your work on this! I just cloned down your repos and found that two versions of CordovaUpdate.m were being added to the .xcodeproj, resulting in:

duplicate symbol _OBJC_CLASS_$_CordovaUpdate in:
    /Users/JP/Library/Developer/Xcode/DerivedData/meteor-cordova-wkwebview-test-erwhccyavepzikgicvdjjohhastk/Build/Intermediates/meteor-cordova-wkwebview-test.build/Debug-iphonesimulator/meteor-cordova-wkwebview-test.build/Objects-normal/x86_64/CordovaUpdate-5E80EC896CF7ECA3.o
    /Users/JP/Library/Developer/Xcode/DerivedData/meteor-cordova-wkwebview-test-erwhccyavepzikgicvdjjohhastk/Build/Intermediates/meteor-cordova-wkwebview-test.build/Debug-iphonesimulator/meteor-cordova-wkwebview-test.build/Objects-normal/x86_64/CordovaUpdate-65C98C3677D1156E.o
duplicate symbol _OBJC_METACLASS_$_CordovaUpdate in:
    /Users/JP/Library/Developer/Xcode/DerivedData/meteor-cordova-wkwebview-test-erwhccyavepzikgicvdjjohhastk/Build/Intermediates/meteor-cordova-wkwebview-test.build/Debug-iphonesimulator/meteor-cordova-wkwebview-test.build/Objects-normal/x86_64/CordovaUpdate-5E80EC896CF7ECA3.o
    /Users/JP/Library/Developer/Xcode/DerivedData/meteor-cordova-wkwebview-test-erwhccyavepzikgicvdjjohhastk/Build/Intermediates/meteor-cordova-wkwebview-test.build/Debug-iphonesimulator/meteor-cordova-wkwebview-test.build/Objects-normal/x86_64/CordovaUpdate-65C98C3677D1156E.o
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

After deleting the CordovaUpdate.m you hadn't updated, the build worked. Although, it's still hanging on the splash screen.

I tried to find where the additional file is coming from, but I'm not sure.

@jamielob
Copy link

@johnthepink - when it hangs has Meteor loaded?

@JamesLefrere
Copy link
Contributor

@johnthepink Sorry, I didn't notice that was still included in the package – I've been using the files in .meteor/local/cordova-build without trying a new 'meteor run ios' build. I've removed that file (and the entry in plugin.xml) and now it should build without the duplicate symbols, but similarly, it's hanging on the splash screen.

@jamielob No, the local server is accessible (http://localhost:12344) but this does not appear to finish loading Meteor, and I can only (for example) put an alert() in cordova.js to see that that file has loaded.

Could it be that it's looking for the wrong local port or address?

@jamielob
Copy link

@JamesLefrere Could you run meteor -v and post any errors that come up?

@rbabayoff
Copy link
Member

Guys, I apologize, but i'm out of mobile development (for now), and I just don't have the time to maintain packages I'm not using internally. I'm also not an Objective C developer, and have asked for help from the community maintaining this package together with an Objective C developer, but haven't found one, as of yet. If anyone wants to pick up the slack, I'm willing to run them through the code, and get them up to speed on the package internals, so they can continue maintaining it.

@jamielob
Copy link

@rbabayoff Noooooooooooo, don't leave us here!

Not sure if you saw my email, but I have a client willing to pay to get this working with 1.2. Don't suppose you'd be interested in getting it up and running before handing it off completely?

@jamielob
Copy link

FYI - spoke with @rbabayoff and my client's budget isn't going to cover it unfortunately. Hoping he'll be able to point us in the right direction here.

@joelpickup
Copy link

POI: https://forums.meteor.com/t/meteor-1-2-ios-wkwebview/11055

Official support expected from next month.

@fungilation
Copy link

Thanks for the update. Official support sounds great
On Thu, Oct 22, 2015 at 11:55 AM Joel Pickup notifications@github.com
wrote:

POI: https://forums.meteor.com/t/meteor-1-2-ios-wkwebview/11055

Official support expected from next month.


Reply to this email directly or view it on GitHub
#8 (comment)
.

@JamesLefrere
Copy link
Contributor

@joelpickup Thanks for the info, we might have to wait for that, then. My fork seems like it ought to be working, but no dice – the WKWebView is there, but it seems like Meteor isn't loaded by meteor_cordova_loader.js, and I'm not sure why.

@thedracle
Copy link

I did this really quick because we had some pressing issues on iOS 9 on a meteor 1.2 project.

I've published it here: https://atmospherejs.com/silvervue/wkwebview

It's working for our 1.2 application at the moment.

I'm happy to generate a pull request, but I think the above changes will break 1.1.

With Meteor 1.2 you do not have to update cordova as specified in the original instructions. In fact, you need to carefully extricate the update by removing it from your cordova-plugins file, and also remove the directories under .meteor/local/ except for 'db'.

For a fresh 1.2 project, you should only have to: meteor add silvervue:wkwebview

@jamielob
Copy link

Thank you @thedracle! Looks like this will be a good stop gap until official support is released.

@JamesLefrere
Copy link
Contributor

@thedracle 👍 Fantastic work, well done!

@rbabayoff
Copy link
Member

@thedracle thanks from me too! You saved me time.

@rbabayoff
Copy link
Member

@thedracle I think you're right, better you publish this as your own package, for meteor 1.2 only. Since I'm out of mobile development, I don't have the time and resources to maintain this package, including testing and merging PRs.

@thedracle
Copy link

@rbabayoff,
Awesome. Thanks for all of the hard work putting this together to begin with, our production application was dead in the water because of iOS9/UIWebView sucking so badly.

We'll continue to maintain this because it's intrinsic to our production application, until there is a direct meteor alternative.

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

No branches or pull requests