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

iOS device build error in 1.2.1.1 #637

Closed
emendamus opened this issue Apr 28, 2016 · 20 comments
Closed

iOS device build error in 1.2.1.1 #637

emendamus opened this issue Apr 28, 2016 · 20 comments
Milestone

Comments

@emendamus
Copy link

emendamus commented Apr 28, 2016

Hello,

as soon as I am trying to create a release build for an iOS device am getting the following compiler error:

Error MT2002: Failed to resolve "System.Void Couchbase.Lite.Storage.SQLCipher.AOTHelper::TrickLinker()" reference from "Couchbase.Lite.Storage.SQLCipher, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"

On simulator everything works great.

I tried it even with a fresh project.
Just added the dependencies and created a database.

@emendamus emendamus changed the title ios release build error in 1.2.1.1 iOS device build error in 1.2.1.1 Apr 29, 2016
@borrrden
Copy link
Member

You mean creating a release build of the library? Or do you mean creating a release build with a project using the Nuget package?

@emendamus
Copy link
Author

emendamus commented Apr 30, 2016

I mean creating a release build with the Nuget package.

So finally I could resolve that issue by the following steps:

  • upgrading from ios sdk 9.2 to 9.3
  • changing the link behaviour to "don't link"

If I say 'link sdk assemblys only '' I get with SDK 9.3 the following error message:

Failed to resolve assembly: 'SQLitePCL.ugly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'

@borrrden
Copy link
Member

I will add a note to the storage engine overview that you need to use "Don't Link". That's the way I test the package, and I didn't think to change it. I will consider making more changes to the way the plugins work for the next release.

@emendamus
Copy link
Author

Okay, perfect!

@emendamus
Copy link
Author

One last question:

Is there a way to reduce the size of the app. So after changing the link behaviour the app size is very huge and I get the following message from iTunes connect:

ERROR ITMS-90122: "Invalid Executable Size. The size of your app's executable file '.....' is 72482816 bytes for architecture 'armv7', which exceeds the maximum allowed size of 60 MB."

@emendamus emendamus reopened this Apr 30, 2016
@borrrden
Copy link
Member

Not sure on that one. I'll try something real quick but if it doesn't work I'll have to post a question on the Xamarin forums. I imagine they have some kind of argument you can write into the custom flags area.

@borrrden
Copy link
Member

Wrote this -> https://forums.xamarin.com/discussion/65752/how-to-get-mtouch-to-ignore-an-assembly

I'll try to figure out a workaround. The best so far is that I need to recompile the storage engines with the dummy code inside of them and have users like you include all three storage engines. This is not an ideal solution though. However, if I switch to manual registration then this hack will be unneeded (and compile times should be faster I think). I'll put this high up on my list of things to do and point you to a CI build once it's done. The bad news is I will be out for half of next week so this will be a bit slow.

@emendamus
Copy link
Author

Wow, thank u for your quick response !

@zgramana zgramana added this to the 1.3 milestone May 6, 2016
borrrden added a commit that referenced this issue May 7, 2016
borrrden added a commit that referenced this issue May 7, 2016
@borrrden borrrden removed the ready label May 7, 2016
@borrrden
Copy link
Member

borrrden commented May 7, 2016

@emendamus This fix is a part of CI build 18 http://latestbuilds.hq.couchbase.com/couchbase-lite-net/1.3.0/18/

I tested it and with the link SDK only option my sample app went from about 60MB to 20MB.

@emendamus
Copy link
Author

@borrrden Thank u for fixing that problem!

But I am getting now this message:

Failed to resolve assembly: 'websocket-sharp, Version=1.0.2.23571, Culture=neutral, PublicKeyToken=null"

Where do I get this assembly?

@borrrden
Copy link
Member

borrrden commented May 7, 2016

Hmmm that should be included in the package but maybe it didn't make it in
somehow. I'll check it out keep an eye out for new builds.

On Sunday, May 8, 2016, emendamus notifications@github.com wrote:

@borrrden https://github.com/borrrden Thank u for fixing that problem!

But I am getting now this message:

Failed to resolve assembly: 'websocket-sharp, Version=1.0.2.23571,
Culture=neutral, PublicKeyToken=null"

Where do I get this assembly?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#637 (comment)

@borrrden
Copy link
Member

borrrden commented May 7, 2016

I confirmed it was missing in build 18, but it's there in build 19 and I was able to consume build 19 in my sample app.

@emendamus
Copy link
Author

It is finally working.
Thanks!

@zgramana zgramana modified the milestones: 1.2.2, 1.3 May 9, 2016
@borrrden borrrden modified the milestones: 1.3, 1.2.2 May 27, 2016
@kibiz0r
Copy link

kibiz0r commented Jun 22, 2016

@borrrden: Do you have an ETA for 1.3 or 1.2.2? We'd like to get this fix, but avoid custom repository URLs if possible. Publishing a pre-release package would be enough for us.

@borrrden
Copy link
Member

borrrden commented Jun 23, 2016

@kibiz0r RIght now we are on track for next Friday (1.3). We may or may not have a preview before then, I'm not sure.

@kentpickard
Copy link

This is also affecting me as well however I'm getting a slightly different error when I build to a device and linking is set to "Link Framework SDKs Only". I'm using v1.2.1.1 with Xamarin.iOS 9.6.2.4

MTOUCH: Error MT2002: Failed to resolve "System.Void Couchbase.Lite.Storage.SQLCipher.AOTHelper::TrickLinker()" reference from "Couchbase.Lite.Storage.SQLCipher, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" (MT2002)

The error goes away if we turn Linking off however we can't do that in our production app. Its already about 50MB with linking turned on.

I am going to download the source for 1.3 and try that. However, @borrrden it would be awesome if we could grab a pre-release from nuget.

@kentpickard
Copy link

kentpickard commented Jul 21, 2016

@borrrden I tried to use build 197 from here: http://latestbuilds.hq.couchbase.com/couchbase-lite-net/1.3.0/197/ but I ran into that web-socket build issue that happened to @kibiz0r

i was able to get past this by using build 19 from http://latestbuilds.hq.couchbase.com/couchbase-lite-net/1.3.0/19/ as well so perhaps there's a regression that's causing that issue to re-appear in build 197

to add the latest findings... build 19 had issues with the forest db at build time that I wasn't seeing at first. trying 130 now and that seems to be working better. had to add the SQLitePCL packages manually.

@chr22
Copy link

chr22 commented Jul 26, 2016

@kentpickard did you get it to work?

I am getting an error on build 134: Couchbase.Lite.CouchbaseLiteException: No implementation found for SQLite storage

@kentpickard
Copy link

@chr22 yes it does seem to be working but perhaps not totally stable. I have my fingers crossed that an official 1.3 version will come out soon.

is one of the errors listed here? https://github.com/couchbase/couchbase-lite-net/wiki/Error-Dictionary

I believe you need to add a line of code to register the particular storage engine you want. I am using ForestDb.

@chr22
Copy link

chr22 commented Jul 26, 2016

@kentpickard thanks a lot.

Now it works, it seems I hadn't registered my storage engine.

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

No branches or pull requests

6 participants