Skip to content

Commit 78e3167

Browse files
FarazFaraz
authored andcommitted
all done ready to merge
1 parent 32902bd commit 78e3167

File tree

5 files changed

+22
-35
lines changed

5 files changed

+22
-35
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## v2.0.1
2+
3+
### Fixes
4+
* Fix internet permission in example's android manifest
5+
* Add internet permission guide for android in readme
6+
* Fix flutter.embedded permission in example's iOS info.plist
7+
18
## v2.0.0
29

310
### Features

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,16 +176,17 @@ Flutter3DViewer.obj(
176176

177177
```yaml
178178
dependencies:
179-
flutter_3d_controller: ^2.0.0
179+
flutter_3d_controller: ^2.0.1
180180
```
181181
182-
### `AndroidManifest.xml` (Android 9+ only)
182+
### `AndroidManifest.xml` (Android only)
183183

184-
To use this widget on Android 9+ devices, your app must be permitted to make an HTTP connection to `http://localhost:XXXXX`.
185-
Android 9 (API level 28) changed the default for [`android:usesCleartextTraffic`] from `true` to `false`,
186-
so you will need to configure your app's `android/app/src/main/AndroidManifest.xml` as follows:
184+
Configure your app's `android/app/src/main/AndroidManifest.xml` as follows:
187185

188186
```diff
187+
188+
+ <uses-permission android:name="android.permission.INTERNET"/>
189+
189190
<application
190191
android:name="${applicationName}"
191192
android:icon="@mipmap/ic_launcher"
@@ -196,8 +197,6 @@ so you will need to configure your app's `android/app/src/main/AndroidManifest.x
196197
android:name=".MainActivity"
197198
```
198199

199-
This does not affect Android 8 and earlier. See [#7] for more information.
200-
201200
### `app/build.gradle` (Android only)
202201

203202
Change minSdkVersion to 21.
@@ -210,7 +209,7 @@ Change minSdkVersion to 21.
210209

211210
### `Info.plist` (iOS only)
212211

213-
To use this widget on iOS, you need to opt-in to the embedded views preview
212+
To use this package on iOS, you need to opt-in to the embedded views preview
214213
by adding a boolean property to your app's `ios/Runner/Info.plist` file, with
215214
the key `io.flutter.embedded_views_preview` and the value `YES`:
216215

@@ -235,7 +234,7 @@ Modify the `<head>` tag of your `web/index.html` to load the JavaScript, like so
235234
- **The 3D model does not display** : First check the example, if models in examples loads, may be there is problem with your model or your model path.
236235
- **The animation list could not be retrieved** : Check if there are any special characters in the animation names that might cause a JSON encoding error.
237236

238-
## Not working with a url on a real device?
237+
## Not working with a url on a real iOS device?
239238

240239
**Problem Description** : If you're having trouble loading 3D models from a URL on a real iOS device, **Lockdown Mode** might be the cause. Lockdown Mode is a security feature in iOS that restricts certain functionalities like network requests or loading embedded content to protect user data.
241240

example/ios/Podfile.lock

Lines changed: 0 additions & 22 deletions
This file was deleted.

example/ios/Runner/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,7 @@
4747
<true/>
4848
<key>UIApplicationSupportsIndirectInputEvents</key>
4949
<true/>
50+
<key>io.flutter.embedded_views_preview</key>
51+
<true/>
5052
</dict>
5153
</plist>

example/lib/main.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ class _MyHomePageState extends State<MyHomePage> {
154154
Flexible(
155155
flex: 1,
156156
child: Flutter3DViewer.obj(
157-
//src: 'assets/flutter_dash.obj',
158-
src: 'https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/flutter_dash_model/flutter_dash.obj',
157+
src: 'assets/flutter_dash.obj',
158+
//src: 'https://raw.githubusercontent.com/m-r-davari/content-holder/refs/heads/master/flutter_3d_controller/flutter_dash_model/flutter_dash.obj',
159159
scale: 5,
160160
// Initial scale of obj model
161161
cameraX: 0,
@@ -204,9 +204,10 @@ class _MyHomePageState extends State<MyHomePage> {
204204
},
205205
//You can have full control of 3d model animations, textures and camera
206206
controller: controller,
207-
//src: 'assets/business_man.glb', //3D model with different animations
207+
src:
208+
'assets/business_man.glb', //3D model with different animations
208209
//src: 'assets/sheen_chair.glb', //3D model with different textures
209-
src: 'https://modelviewer.dev/shared-assets/models/Astronaut.glb', // 3D model from URL
210+
//src: 'https://modelviewer.dev/shared-assets/models/Astronaut.glb', // 3D model from URL
210211
),
211212
)
212213
],

0 commit comments

Comments
 (0)