Hi! I've got a problem with your plugin. I've built the sample project with iOS 7.1 target.
I get the following error:
Undefined symbols for architecture arm64:
"_OBJCCLASS$_MFMailComposeViewController", referenced from:
objc-class-ref in libPDFReader.a(PDFReader.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What can I do? I really need this working soon.
Hello @slavaobninsk
We are using latest PDFReader v.1.37 but in Android 7.1.1 we are not able to load the pdf file.
It throws this error:
06-21 13:49:49.008 5254-5271/? I/Unity: AndroidJavaException: android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/com.opel.OpelExclusiveAR/files/Opel_AR_Marker_60x45.pdf exposed beyond app through Intent.getData()
android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/com.opel.OpelExclusiveAR/files/Opel_AR_Marker_60x45.pdf exposed beyond app through Intent.getData()
at android.os.StrictMode.onFileUriExposed(StrictMode.java:1799)
at android.net.Uri.checkFileUriExposed(Uri.java:2346)
at android.content.Intent.prepareToLeaveProcess(Intent.java:8965)
at android.content.Intent.prepareToLeaveProcess(Intent.java:8926)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1517)
at android.app.Activity.startActivityForResult(Activity.java:4225)
at android.app.Activity.startActivityForResult(Activity.java:4183)
at android.app.Activity.startActivity(Activity.java:4522)
at android.app.Activity.startActivity(Activity.java:4490)
at com.SlavaObninsk.pdfreader.Logic.OpenDocLocal(Logic.java:57)
Do you know how to solve it?
Thanks
@slavaobninsk hi, thanks for the link.
I tried adding in pdfreader AndroidManifest located in Plugins/Android/PDFReader/AndroidManifest.xml the following:
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.company.appname.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
but still throws the same error.
I also tried adding it in the main AndroidManifest which is located in Plugins/Android/AndroidManifest.xml but then it doesn't build the app at all.
Any other ideas?
Thanks.
this is how is used: StartCoroutine(PDFReader.OpenDocLocal("Opel_AR_Marker_60x45"));
the doc is in StreamingAssets
and it fails ind Nexus9, Galaxy S6 all having Android 7.x
Instead in another Galaxy S6 with Android 6.x is ok
Tried in a new project, where I added PDFReader with Unity v5.6.1 and also updated android sdk to v26, device Nexus 9 Android v7.1.1.
With no changes, it throws the same error.
Tried modifying AndroidManifest by adding:
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.c.pn.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
But it doesn't build and fails to recognize resources:
stderr[
AndroidManifest.xml:7: error: Error: No resource found that matches the given name (at 'resource' with value '@xml/provider_paths').
]
@slavaobninsk
Can you please provide the apk you built in the video, so I can test your version, thanks.